#include "rules.h"
#include <string>

#ifdef DEBUG
#include <iostream>
#endif

bool rule9(std::string key, bool type_cle) {
    std::string charset = rule1(type_cle);
    std::string triplet;
    for (int i = 0; i < charset.length(); i++) {

        if (key.find(triplet.assign(5, charset[i])) != std::string::npos) {
#ifdef DEBUG
#pragma omp critical
            std::cerr << key << " - R9 : " << triplet.assign(5, charset[i]) << std::endl;
#endif
            return false;
        }
    }
    return true;
}
